﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
using PowerPoint = Microsoft.Office.Interop.PowerPoint;
using Office = Microsoft.Office.Core;
using Vsto = Microsoft.Office.Tools;

namespace PowerPointAddIn1
{
    public partial class ThisAddIn
    {

        private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
        {
        }

        public Vsto.CustomTaskPane m_MyBlogsPane;
        private void ThisAddIn_Startup(object sender, System.EventArgs e)
        {
            //pane
            m_MyBlogsPane = this.CustomTaskPanes.Add(new UserControl1(), "My Blogs");
            m_MyBlogsPane.VisibleChanged += new EventHandler(MyBlogsPane_VisibleChanged);
        }

        private void MyBlogsPane_VisibleChanged(object sender, EventArgs e)
        {
            BloggingRibbon myRibbon = (BloggingRibbon)Globals.Ribbons.Single(rb => rb.Name == "BloggingRibbon");
            myRibbon.toggleButton1.Checked = m_MyBlogsPane.Visible;
        }



        #region VSTO 生成的代码

        /// <summary>
        /// 设计器支持所需的方法 - 不要
        /// 使用代码编辑器修改此方法的内容。
        /// </summary>
        private void InternalStartup()
        {
            this.Startup += new System.EventHandler(ThisAddIn_Startup);
            this.Shutdown += new System.EventHandler(ThisAddIn_Shutdown);
        }
        
        #endregion
    }
}
